Kanzi 3.9.10
kanzi::Tag Class Reference

Tag represents a mark that can be added to a node to mark that the node is of certain kind. More...

#include <kanzi/core.ui/graphics3d/tag.hpp>

Public Member Functions

 Tag (const string &name)
 Creates a tag.
 

Static Public Member Functions

static void addTag (Node &node, const Tag &tag)
 Adds a tag to the node.
 
static Tag createTransparentTag ()
 Creates a transparent tag that is used in the default composer.
 
static bool hasTag (const Node &node, const Tag &tag)
 Checks if a node has a tag.
 
static void removeTag (Node &node, const Tag &tag)
 Removes a tag from the node.
 

Detailed Description

Tag represents a mark that can be added to a node to mark that the node is of certain kind.

For example transparent nodes can be marked with a "Transparent" tag. The transparent nodes can then be rendered in a different way than other objects by using a tag filter that selects only nodes with the "Transparent" tag.

Constructor & Destructor Documentation

◆ Tag()

kanzi::Tag::Tag ( const string & name)
explicit

Creates a tag.

Parameters
nameThe name of the tag.

Member Function Documentation

◆ createTransparentTag()

static Tag kanzi::Tag::createTransparentTag ( )
static

Creates a transparent tag that is used in the default composer.

Returns
A tag for transparent objects.

◆ addTag()

static void kanzi::Tag::addTag ( Node & node,
const Tag & tag )
static

Adds a tag to the node.

If the node already has the tag, does nothing.

Parameters
nodeThe node that is tagged.
tagThe added tag.

◆ removeTag()

static void kanzi::Tag::removeTag ( Node & node,
const Tag & tag )
static

Removes a tag from the node.

If the node doesn't have the tag, does nothing.

Parameters
nodeThe node where the tag is removed.
tagThe removed tag.

◆ hasTag()

static bool kanzi::Tag::hasTag ( const Node & node,
const Tag & tag )
static

Checks if a node has a tag.

Parameters
nodeThe node that is checked.
tagThe tag that is checked.
Returns
True if the node has the tag; false otherwise.

The documentation for this class was generated from the following file: